package com.arpa.oms.domain.entity;

import com.arpa.wms.domain.entity.BasicEntity;
import com.arpa.wms.domain.entity.GoodsUnitConversion;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 商品关系明细
 * </p>
 *
 * @author spb
 * @since 2021-07-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="OmsGoodsRelationItem对象", description="商品关系明细")
public class OmsGoodsRelationItem extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "数据标识")
    private String code;

    @ApiModelProperty(value = "商品关系code")
    private String goodsRelationCode;

    @ApiModelProperty(value = "商品标识")
    private String goodsCode;

    @ApiModelProperty(value = "商品编码")
    private String goodCode;

    @ApiModelProperty(value = "商品条码")
    private String goodsBarCode;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品规格")
    private String spec;

    @ApiModelProperty(value = "保质期（天）")
    private BigDecimal expirationQuantity;

    @ApiModelProperty(value = "基本单位(出库单位)")
    private String basicUnit;

    @ApiModelProperty(value = "基本单位名称(出库单位名称)")
    private String basicUnitName;

    @ApiModelProperty(value = "当前商品单位转基本单位件装量")
    private BigDecimal unitConvertQuantity;

    @ApiModelProperty(value = "销售单位")
    private String saleUnit;

    @ApiModelProperty(value = "销售单位名称")
    private String saleUnitName;

    @ApiModelProperty(value = "销售数量（销售单位）")
    private BigDecimal planQuantity;

    @ApiModelProperty(value = "实际销售数量（销售单位）")
    private BigDecimal actualQuantity;

    @ApiModelProperty(value = "销售数量（基本单位）")
    private BigDecimal planBasicQuantity;

    @ApiModelProperty(value = "实际销售数量（基本单位）")
    private BigDecimal actualBasicQuantity;

    @ApiModelProperty(value = "税率")
    private BigDecimal taxRate;

    @ApiModelProperty(value = "单价")
    private BigDecimal unitPrice;

    @ApiModelProperty(value = "含税单价")
    private BigDecimal taxUnitPrice;

    @ApiModelProperty(value = "金额")
    private BigDecimal amountMoney;

    @ApiModelProperty(value = "税额")
    private BigDecimal taxMoney;

    @ApiModelProperty(value = "价税合计")
    private BigDecimal totalMoney;

    @ApiModelProperty(value = "退货数量（销售单位）")
    private BigDecimal refundQuantity;

    @ApiModelProperty(value = "退货数量（基本单位）")
    private BigDecimal refundBasicQuantity;

    @ApiModelProperty(value = "待弃用，计划数量（基本单位）")
    private BigDecimal deliveryQuantity;

    @ApiModelProperty(value = "待弃用，出库数量（基本单位）")
    private BigDecimal outQuantity;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "进货价格")
    @TableField(value = "receipt_price")
    private BigDecimal receiptPrice;

    @ApiModelProperty(value = "销售价格")
    @TableField(value = "delivery_price")
    private BigDecimal deliveryPrice;

    @ApiModelProperty(value = "单位转换")
    @TableField(exist = false)
    private List<GoodsUnitConversion> goodsUnitConversionList;

    public interface Save{}
    public interface Update{}
}
